package com.example.mobile2030606155byl0415classwork;

import android.os.Bundle;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

public class MainActivity extends AppCompatActivity {

    private TextView textView;
    private RecyclerView rvmainpeople;
    private String [] names={"丁云深","小明","小红","小龙","小车","晓晓","小金",};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        rvmainpeople.setLayoutManager(new LinearLayoutManager(this));
        PepoleAdapter adapter = new PepoleAdapter(names);
        rvmainpeople.setAdapter(adapter);
    }

    private void initView() {
        textView = findViewById(R.id.textView);
    }
}